repo/checkout: Verify early if src/destination are on same device
authorColin Walters <walters@verbum.org>
Mon, 6 Mar 2017 19:51:14 +0000 (14:51 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 6 Mar 2017 20:58:04 +0000 (20:58 +0000)
commitff34810097460a4cac7965213db54150e4e7ae06
tree60efab30782e94e2dc1f2d61b41c092c372aff69
parent3219a5d0ee4bf10479363690e05400ebdab18be3
repo/checkout: Verify early if src/destination are on same device

At least in all Linux kernels up to today, one can never `link()` across
devices, so we might as well verify that up front. This will help for a future
patch to add a new type of union-add checkout, since Linux checks for `EEXIST`
before `EXDEV`.

Closes: #714
Approved by: jlebon
src/libostree/ostree-repo-checkout.c
tests/test-rofiles-fuse.sh